package com.budwk.app.sqfw.enums;

import lombok.Getter;

/**
 * 安全隐患状态a17
 */
@Getter
public enum SafeHazardA17Enum {

    ALL(1, "全部"),
    ON_SITE_RECTIFICATION(2, "现场整改"),
    DEAD_RECTIFICATION(3, "限期整改"),
    NORMAL(4, "正常"),
    RECTIFIED(5, "已整改");

    private Integer code;

    private String name;

    SafeHazardA17Enum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * @param code
     * @return
     */
    public static String getName(Integer code) {
        for (SafeHazardA17Enum o : SafeHazardA17Enum.values()) {
            if (o.getCode() == code) {
                return o.getName();
            }
        }
        return null;
    }
}
